(function($) {	
	$.fn.lastElement = function(options, callback) {
	if($.isFunction(options)) {
		callback = options;
		options = null;
    }
	$.fn.lastElement.defaults = {
			container_id: '#widgets',
			borderRight: 'none',
			marginRight: '0px',
			paddingRight: '0px',
			borderBottom: 'none',
			marginBottom: '0px',
			width: null,
			setup: null
		};
	var options = $.extend($.fn.lastElement.defaults,options);
	var $container;
	// Plugin code
    return this.each(function() {
      $container = $(this)
	  var the_children = $container.children(':last-child')
      $(the_children).each(function() {
        $(this).css({
		borderRight:options.borderRight,
		marginRight:options.marginRight,
		paddingRight:options.paddingRight,
		borderBottom:options.borderBottom,
		marginBottom:options.marginBottom,
		width:options.width
		})
		}).addClass('lastElement');
		
        // Fire the setUp callback
        $.isFunction( options.setup ) && options.setup.call(this);
		});
		
	}

})(jQuery);

//this is an example
//$('#home_widgets').lastElement(); //run this is on amr.dev.1over0.com


$.fn.sameHeights = function() {
        $(this).each(function(){
            var tallest = 0;
            $(this).children().each(function(i){
                if (tallest < $(this).height()) { tallest = $(this).height(); }
            });
            $(this).children().css({'height': tallest});
        });
        return this;
    }; 

	//call the sameHeights function
	$('.sameHeights').sameHeights();
	































